package com.xuelang.pipeline.infrastructure.project.converter;

import com.xuelang.pipeline.domain.project.ProjectType;
import com.xuelang.pipeline.infrastructure.project.dataobject.ProjectTypeDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>项目实体与DO的转换类</p>
 *
 * @author : yixin.lys
 * @date : 2024-09-02 16:39
 **/
@Mapper
public interface ProjectTypeToDOConverter {

    ProjectTypeToDOConverter INSTANCE = Mappers.getMapper(ProjectTypeToDOConverter.class);

    /**
     * 从实体转为DO
     * @param projectType
     * @return
     */
    ProjectTypeDO toDO(ProjectType projectType);

    /**
     * 从DO转为实体
     * @param projectTypeDO
     * @return
     */
    ProjectType fromDO(ProjectTypeDO projectTypeDO);
}
